package com.perfectoMobile.utils.device;

import junit.framework.SystemTestCase;

import com.perfectoMobile.utils.device.GeneralEnums.IosVersion;
import com.perfectoMobile.utils.device.GeneralEnums.Os;
import com.perfectoMobile.utils.device.androidDevices.AndroidDevice;
import com.perfectoMobile.utils.device.iosDevices.IosDevice;



public class DeviceFactory {
	
	static PmProduct device = null;
	
	
	
	
	public static PmProduct getDeviceInstance(Dut dut) throws Exception{
		Os os = dut.getOs();
		SystemTestCase.report.report("create "+ os.toString() + " device instance");

		try{
		switch(os)
		{
		case IOS : 
			device = new IosDevice() {
			};
			break;
		case ANDROID :
			device = new AndroidDevice();
			break ;
		case WINDOWSPHONE :
			break;
		default:			
			throw new Exception();
	
		}
		

		}
		catch(Exception e){
			SystemTestCase.report.report("This model doesn't supported",jsystem.framework.report.Reporter.FAIL);
		}
		finally{
			return device;
		
		}
		
	}

}
